<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
	prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
	<head>
		<title><decorator:title default="Knowledge" /></title>
		<s:url value="/js/jquery/superfish/css/superfish.css" var="cssFish"></s:url>
		<link rel="stylesheet" type="text/css" href="${cssFish}" media="screen">
		<s:url value="/css/smoothness/jquery-ui-1.8.2.custom.css" var="cssSmooth"></s:url>
		<link type="text/css" href="${cssSmooth}" rel="stylesheet" />
		<s:url value="/js/jquery/jquery-1.6.4.min.js" var="jsJQuery"></s:url>
		<script type="text/javascript" src="${jsJQuery}"></script>
		<s:url value="/js/jquery-ui-1.8.2.custom.min.js" var="jsJQueryUi"></s:url>
		<script type="text/javascript" src="${jsJQueryUi}"></script>
		<s:url value="/js/jquery.centreIt-min-1.1.2.js" var="jsCenterIt"></s:url>
		<script type="text/javascript" src="${jsCenterIt}"></script>	
		<s:url value="/js/jquery/superfish/js/hoverIntent.js" var="jsHover"></s:url>
		<script type="text/javascript" src="${jsHover}"></script>
		<s:url value="/js/jquery/superfish/js/superfish.js" var="jsSuper"></s:url>
		<script type="text/javascript" src="${jsSuper}"></script>
		<script type="text/javascript">
			// initialise plugins
			jQuery(function() {
				jQuery('ul.sf-menu').superfish();
			});
			
			function displayLoading(){
				$("#loading").show();
				$("#loading").CenterIt();
				$(".loadingImage").show();
				$(".loadingImage").CenterIt();
			}
			
			$(document).ready(function() {			
				$("form").submit(function(){
					displayLoading();
				});
				$("#loading").hide();
				$(".loadingImage").CenterIt();
				$(".loadingImage").hide();
			});
		</script>

		<s:url value="/css/style.css" var="cssLayout"></s:url>
		<link rel="stylesheet" type="text/css" href="${cssLayout}">
		<STYLE type="text/css">
			.loading{
				width: 110%;
				height: 110%;
				position: absolute;
				top: 0;
				left: 0;
				background-color: black;
				filter:alpha(opacity=40);
				-moz-opacity:0.4;
				-khtml-opacity: 0.4;
				opacity: 0.4;
				z-index: 1001;
			}
			
			.loadingImage{
				z-index: 1002;
				color: black;
				position: absolute;
				width: 300px;
				height: 300px;
				display:none;
				margin: 0 auto;
				left: 500px;
			}
			
			.loadingMsg{
				font-size: 13px;
				font-weight: bolder;
			}
		</STYLE>
		<div style="clear:all;"></div>
		<div id="loading" class="loading"></div>
		<div class="loadingImage">
			<s:url value="/images/2.gif" var="loadImg"></s:url>
			<img src="${loadImg}">
			<br/>
			<span class="loadingMsg">
				  Carregando...
			</span>
		</div>
	<decorator:head />
	</head>
	<body>
		<div id="page-holder">
			<div id="login-info">
				<div id="login-menu">
					<s:url value="callLogin" var="paginaLogin"></s:url>
					<a href="${paginaLogin}">Login</a>
				</div>
			</div>
			<div id="header">
				<div style="float: left;">
					<h1 class="logo">
						Knowledge
					</h1>
					<h3 class="sub-logo">
						conhecimento ao seu favor
					</h3>
				</div>
				<div style="clear: both;"></div>
			</div>
			<s:if test="hasActionErrors() || hasActionMessages() || hasFieldErrors()">
				<div style="margin-bottom: 5px;">
					<s:if test="hasActionErrors() || hasFieldErrors()">
						<div class="ui-state-error ui-corner-all"
							style="margin-top: 8px; margin-bottom: 5px;">
							<div style="margin-top: 10px; font-size: 10px;">
								<s:iterator value="actionErrors">
									<p style="display: block">
										<span class="ui-icon ui-icon-alert"
											style="float: left; margin-left: 5px; margin-right: .3em;"></span>
										<span class="actionMessage"><s:property
												escape="false" /> </span>
									</p>
								</s:iterator>
								<s:if test="hasFieldErrors()">
										<p>
											<span class="ui-icon ui-icon-alert"
												style="float: left; margin-left: 5px; margin-right: .3em;"></span>
											<span style="top:2px;position:relative;">Os seguintes erros foram econtrados:</span>
											<span class="actionMessage"><s:fielderror/></span>
										</p>
								</s:if>
							</div>
						</div>
					</s:if>
					<s:if test="hasActionMessages()">
						<div class="ui-state-highlight ui-corner-all"
							style="margin-top: 8px; margin-bottom: 5px;">
							<div style="margin-top: 10px; font-size: 10px;">
								<s:iterator value="actionMessages">
									<p>
										<span class="ui-icon ui-icon-info"
											style="float: left; margin-left: 5px; margin-right: .3em;"></span>
										<span class="actionMessage"><s:property
												escape="false" /> </span>
									</p>
								</s:iterator>
							</div>
						</div>
					</s:if>
				</div>
			</s:if>
			<div id="body" style="height:73.5%;">
				<decorator:body />
			</div>
			<div id="footer" >
				<p style="height:30px; margin-top: 5px">
					Copyright 2012 - Knowledge
				</p>
			</div>
		</div>

	</body>
</html>